package com.docker.drug.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.docker.drug.mapper.DoctorDrugsOutIntermediateMapper;
import com.docker.drug.domain.DoctorDrugsOutIntermediate;
import com.docker.drug.service.IDoctorDrugsOutIntermediateService;

/**
 * 药品入库和药品中间Service业务层处理
 * 
 * @author lin
 * @date 2025-04-12
 */
@Service
public class DoctorDrugsOutIntermediateServiceImpl implements IDoctorDrugsOutIntermediateService 
{
    @Autowired
    private DoctorDrugsOutIntermediateMapper doctorDrugsOutIntermediateMapper;

    @Override
    public List<DoctorDrugsOutIntermediate> selectDrugCode(String drugCode) {
        List<DoctorDrugsOutIntermediate> list = doctorDrugsOutIntermediateMapper.selectDrugCode(drugCode);
        return list;
    }

    /**
     * 查询药品入库和药品中间
     * 
     * @param id 药品入库和药品中间主键
     * @return 药品入库和药品中间
     */
    @Override
    public DoctorDrugsOutIntermediate selectDoctorDrugsOutIntermediateById(Long id)
    {
        return doctorDrugsOutIntermediateMapper.selectDoctorDrugsOutIntermediateById(id);
    }

    /**
     * 查询药品入库和药品中间列表
     * 
     * @param doctorDrugsOutIntermediate 药品入库和药品中间
     * @return 药品入库和药品中间
     */
    @Override
    public List<DoctorDrugsOutIntermediate> selectDoctorDrugsOutIntermediateList(DoctorDrugsOutIntermediate doctorDrugsOutIntermediate)
    {
        return doctorDrugsOutIntermediateMapper.selectDoctorDrugsOutIntermediateList(doctorDrugsOutIntermediate);
    }

    /**
     * 新增药品入库和药品中间
     * 
     * @param doctorDrugsOutIntermediate 药品入库和药品中间
     * @return 结果
     */
    @Override
    public int insertDoctorDrugsOutIntermediate(DoctorDrugsOutIntermediate doctorDrugsOutIntermediate)
    {
        return doctorDrugsOutIntermediateMapper.insertDoctorDrugsOutIntermediate(doctorDrugsOutIntermediate);
    }

    /**
     * 修改药品入库和药品中间
     * 
     * @param doctorDrugsOutIntermediate 药品入库和药品中间
     * @return 结果
     */
    @Override
    public int updateDoctorDrugsOutIntermediate(DoctorDrugsOutIntermediate doctorDrugsOutIntermediate)
    {
        return doctorDrugsOutIntermediateMapper.updateDoctorDrugsOutIntermediate(doctorDrugsOutIntermediate);
    }

    /**
     * 批量删除药品入库和药品中间
     * 
     * @param ids 需要删除的药品入库和药品中间主键
     * @return 结果
     */
    @Override
    public int deleteDoctorDrugsOutIntermediateByIds(Long[] ids)
    {
        return doctorDrugsOutIntermediateMapper.deleteDoctorDrugsOutIntermediateByIds(ids);
    }

    /**
     * 删除药品入库和药品中间信息
     * 
     * @param id 药品入库和药品中间主键
     * @return 结果
     */
    @Override
    public int deleteDoctorDrugsOutIntermediateById(Long id)
    {
        return doctorDrugsOutIntermediateMapper.deleteDoctorDrugsOutIntermediateById(id);
    }
}
